package com.cpa.admin.model;

import com.cpa.admin.utils.UUIdGenId;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import tk.mybatis.mapper.annotation.KeySql;
import tk.mybatis.mapper.annotation.NameStyle;
import tk.mybatis.mapper.code.Style;

import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalTime;
import java.util.Date;

/**
* Created by Mybatis Generator 2018/11/04
 * @author zhao
 */
@Data
@Table(name = "user")
@NameStyle(Style.camelhumpAndLowercase)
public class UserDo implements Serializable {

    @Id
    @KeySql(genId = UUIdGenId.class)
    private String id;

    /**用户名*/
    private String username;

    private String password;

    /**真实姓名*/
    private String realname;

    /**项目Id*/
    private String productId;

    /**当前推广获取的金额*/
    private BigDecimal currentAmount;

    /**账户总推荐金额*/
    private BigDecimal accountAmountCount;

    /**结算推送时间*/
    @DateTimeFormat(pattern = "HH:mm:ss")
    private LocalTime settleAmountPushTime;

    /** 点击清空余额的时间*/
    private Date clearAmountDate;

    private Date updateTime = new Date();

    private Date createTime = new Date();

    private Integer deleteFlag = 0;

    private Integer isAdmin ;

    private static final long serialVersionUID = 1L;


}